#ifndef AMbera_h
#define AMbera_h

#include <stdlib.h>
#if defined(ARDUINO)
 #if ARDUINO >= 100
  #include <Arduino.h>
 #else
  #include <wiring.h>
 #endif
#endif


#define BERA_L1_MAX_PAYLOAD_SIZE 16 // Size in Bytes
#define BERA_L1_MAX_DATA_BUFF 256 // BERA_L1_MAX_PAYLOAD_SIZE * 8 bits * 2 pulses
#define BERA_L1_SYNC_PULSES 10 // Number of pulses to syncronize Rx and Tx
#define BERA_L1_START_PULSES 4 // Number of pulses which defines the start of a Message

#define BERA_BASE_LOW_LEN  1000 // Length in Microseconds
#define BERA_L1_START_PULSE_LEN 2000 // Length in Microsecons
#define BERA_L1_DATA_SHORT_LEN 500
#define BERA_L1_DATA_LONG_LEN 1000
#define BERA_L1_MSG_RETRANS 3

extern "C"
{



int sendMsg(int pinTX, char *msg);

char* receiveMsg(int pinRx);


}


#endif
